/**2.html 登陆页面表单验证**/
 $(function(){
 	$('#form_login').validate({
  	 	 rules: {
  	 	 	username: {
  	 	 		 required: true,
  	 	 		 minlength: 5	 
  	 	 	},
  	 	 	password: {
  	 	 		 required: true,
  	 	 		 minlength: 5
  	 	 	},
  	 	 },
  	 	 messages: {
  	 	 	username: {
  	 	 		required : "请输入用户名或是邮箱",
  	 	 		minlength: "请至少输入5位数的字母"
  	 	 	},
  	 	 	password: {
  	 	 		required : "请输入密码",
  	 	 		minlength: "请至少输入5个字符或者数字"
  	 	 	},
  	 	 },
       errorElement: "span",
         success: function(label){
             label.text("")
            .addClass("success");
        }
  	 });
 }) ;	 
 /** 26.html 买家账号注册**/
 $(function(){
  $('#buy_form').validate({
     rules: {
        email:{
          required: true,
           email: true
        },
        username: {
           required: true,
           minlength: 5  
        },
        phone: {
           required: true,
           minlength: 11
        },
        password: {
           required: true,
           minlength: 5
        },
        confirm_password: {
           required: true,
           minlength: 5,
           equalTo: "#password"
        }
       },
       messages: {
        email:{
                 required: "请输入电子邮件",
                 email: "请输入正确的电子邮件格式"
        },
        username: {
          required : "请输入用户名或是邮箱",
          minlength: "请至少输入5位数的字母"
        },
        phone: {
           required: "请输入手机号码",
           minlength: "请输入正确手机号码"
        },
        password: {
          required : "请输入密码",
          minlength: jQuery.format("密码不能小于{0}个字 符")
        },
        confirm_password: {
          required: "请输入确认密码",
          minlength: "确认密码不能小于5个字符",
          equalTo: "两次输入密码不一致"
   }
       },
       errorElement: "em",
         success: function(label){
             label.text("")
            .addClass("success");
        }
   	   
   })
 }) 
/** 20 找回密码 **/
$(function(){
	$('#porleft').validate({
		
	})
})
